import axios from "../../axios";

// 查询店铺信息
export const getshopinfo = () => {
  return axios.request({
    url: "/shops/home/show/all",
    method: "GET",
  });
};

//修改店铺信息
export const updateshop = (param) => {
  return axios.request({
    url: "/shops/shopper/store/update/shop",
    method: "PUT",
    params:param
  });
};

//通过userid查询商家全部店铺
export const getshopByid = (param) => {
  return axios.request({
    url: "/shops/shopper/store/show/shop/all",
    method: "GET",
    params:param
  });
};

// 申请店铺
export const addStore = (param,formdata) => {
  return axios.request({
    url: "/shops/shopper/store/addStore",
    method: "POST",
    params:param,
    data:formdata,
    maxContentLength:Infinity,
    maxRedirects:5,
    maxBodyLength:Infinity,
  });
};

//修改店铺封面
export const updateheadimg = (param,formdata) => {
  return axios.request({
    url: "/shops/shopper/store/update/storeCover",
    method: "PUT",
    params:param,
    data:formdata,
    maxContentLength:Infinity,
    maxRedirects:5,
    maxBodyLength:Infinity,
  });
};
